﻿namespace Shortcuts.Globalization
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using System.Text;
    using System.Threading;

    public sealed class Localized
    {
        public static string Get(string text)
        {
            return Get(text, Thread.CurrentThread.CurrentCulture);
        }

        public static string Get(string text, CultureInfo culture)
        {
            string localized = Lang.ResourceManager.GetString(text, Thread.CurrentThread.CurrentCulture);
            return string.IsNullOrEmpty(localized) ? text : localized;
        }
    }
}
